
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.logging.Level;
import java.util.logging.Logger;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author Padda1
 */
public class RenameRefactorTest 
{
    int x;
    int y;
    String fileRead = "";
    
    RenameRefactorTest() throws FileNotFoundException
    {
        x = 5;
        y = 5;
        
        FileEditor fileEdit = new FileEditor();
        fileRead = fileEdit.read("src/GUI.java");
        System.out.println(fileRead);
        FileEditor fileEdit2 = new FileEditor();
        fileRead = fileEdit2.read("src/Test1.java");
        System.out.println(fileRead);
    }
    
    RenameRefactorTest(int x1, int y1)
    {
        x = x1;
        y = y1;
    }
    
    int multipy()
    {
        return x * y;
    }
    
    int multipy(int x1, int y1)
    {
        return x1 * y1;
    }
    
    boolean compareFiles()
    {
        boolean result = false;
        try {
            FileEditor fileEdit = new FileEditor();
            fileRead = fileEdit.read("src/GUI.java");
            FileEditor fileEdit2 = new FileEditor();
            if (fileRead.equals(fileEdit2.read("src/Test1.java")))
            {
                result = true;
            }
        } catch (FileNotFoundException ex) {
            Logger.getLogger(RenameRefactorTest.class.getName()).log(Level.SEVERE, null, ex);
        }
        return result;
    }
    
    void write()
    {
        FileEditor file = new FileEditor();
        try {
            file.write("renameTest.txt", "X: " + x + "\nY: " + y);
        } catch (IOException ex) {
            Logger.getLogger(RenameRefactorTest.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
    
    void write(String type)
    {
        FileEditor file = new FileEditor();
        try {
            file.write("renameTest" + type, "X: " + x + "\nY: " + y);
        } catch (IOException ex) {
            Logger.getLogger(RenameRefactorTest.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
}
